package com.cw.jeeyt.service.mq.consumer;


import org.springframework.stereotype.Component;

import com.cw.mq.Action;
import com.cw.mq.ConsumeContext;
import com.cw.mq.Message;
import com.cw.mq.MessageListener;

import lombok.extern.slf4j.Slf4j;

/**
 * @author zhangyc16384
 */
@Component("testComsumer")
@Slf4j
public class TestConsumer implements MessageListener {

    @Override
    public Action consume(Message message, ConsumeContext context) {
        log.info("开始测试回调消费");
        log.info("开始消费,内容为：{}", new String(message.getBody()));
        return Action.CommitMessage;
    }

}
